AR  := ar
LD  := ld
GCC := gcc
CCFLAG := -m32 -I../include -nostdinc -ffreestanding -fno-pic -Wall -fomit-frame-pointer -fno-stack-protector -c
OBJS   := ctype.o write.o string.o

lib.a : $(OBJS)
		$(AR) rcs $@ $^
		sync

ctype.o : ctype.c
		$(GCC) $(CCFLAG) -o $@ $<

write.o : write.c
		$(GCC) $(CCFLAG) -o $@ $<

string.o : string.c
		$(GCC) $(CCFLAG) -o $@ $<

clean : 
		rm *.o
		rm lib.a

